package com.etc.zzsys.dao.impl;

import java.util.List;

import com.etc.zzsys.dao.QuestionDao;
import com.etc.zzsys.entiy.Question;
import com.etc.zzsys.util.BaseDao;

/**
 * 自定义QuestionDaoImpl
 * 
 * @author knowno
 *
 */
public class QuestionDaoImpl implements QuestionDao {

	/**
	 * 查询所有的问题列表
	 * 
	 * @return List<Question>
	 */
	@Override
	public List<Question> queryQuestions() {
		@SuppressWarnings("unchecked")
		List<Question> list = (List<Question>) BaseDao.select("SELECT question.qid,question.title,question.content,question.qdate,users.userName FROM question INNER JOIN users on question.userId = users.userId", Question.class);
		return list;
	}

	

}
